//
//  ISSafetyAlarmMailManager.h
//  iPhoneSafety
//
//  Created by dl on 2019/1/5.
//  Copyright © 2019 com.li.ding. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

FOUNDATION_EXPORT NSString * const kISSafetyAlarmAuthLocationNotification;

typedef void (^MailSendCompletion) (BOOL success, NSError * _Nullable error);

@interface ISSafetyAlarmMailManager : NSObject

NW_SINGLETON_INSTANCE_METHOD_DECLARATION

@property (nonatomic, copy) NSString *fromEmail;
@property (nonatomic, copy) NSString *loginAccount;
@property (nonatomic, copy) NSString *loginPassword;

@property (nonatomic, copy) NSString *relayHost;

@property (nonatomic, assign, readonly, getter=isTakePhotoOn) BOOL takePhotoOn;
@property (nonatomic, copy, readonly) NSString *receiver;

- (void) enableTakePhoto:(BOOL)enable;
- (void) updateReceiver:(NSString *)receiver;

- (void) requestLocationAuthorization;
- (void) sendMailWithmage:(UIImage *)image completion:(MailSendCompletion)completion;

@end

NS_ASSUME_NONNULL_END
